<%= form_for(@product) do |f| %>

<% if @product.errors.any? %>
<div id="error_explanation">
	<h2><%= pluralize(@product.errors.count, "error") %> prohibited this product from being saved:</h2>

	<ul>
		<% @product.errors.full_messages.each do |msg| %>
		<li>
			<%= msg %>
		</li>
		<% end %>
	</ul>
</div>
<% end %>

<fieldset>

	<div class="field">
		<%= f.label :name %>
		<%= f.text_field :name %>
	</div>
	<div class="field">
		<%= f.label :description %>
		<%= f.text_area :desc, :rows => 5   %>
	</div>

	<div class="field">
		<%= f.label :price %>
		<%= f.text_field :price %>
	</div>

	<div class="field">
		<%= f.label :category %>
		<%= f.collection_select(:category_id, Category.all, :id,:name, :prompt => true)%>
	</div>

</fieldset>
<div class="actions">
	<%= f.submit  :class => 'gray-btn' %>
</div>
<% end %>
